* FILE NAME : EMPREG.PRG
*
SELE 5
SET EXCLU OFF
USE &DR&F5
IF FIL_LOCK(0)
   APPE BLANK
ENDIF
UNLOCK
IF REC_LOCK(0)
   REPL PAT_NAME WITH PNAME,PAT_F_NAME WITH PFNAME,PAT_M_INIT WITH MINIT,PAT_SEX WITH PATSEX
   REPL PAT_DOB WITH PATDOB,PAT_NATIO WITH PATNAT,BLOOD_GRP WITH BLOODG,BLOOD_RHE WITH BLOODR
   REPL HOM_ADD  WITH HOMADD,HOM_CITY WITH HOMCITY,HOM_COUNT WITH HOMCOUNT,HOM_TEL  WITH HOMTEL
**Buu Email address 24/6/03
   REPL EMAIL WITH E_MAIL
   REPL ARCH_C WITH ARCH_CL
**Buu End 24/6/03
   REPL LOC_ADD1 WITH LOCADD1,LOC_ADD2 WITH LOCADD2,LOC_CITY WITH LOCCITY,LOC_TEL WITH LOCTEL
   REPL JOB_POSIT WITH JOBPOSIT,JOB_CRPCOD WITH COCOD,JOB_CORP WITH conam,JOB_ADD1 WITH JOBADD1
   REPL JOB_ADD2 WITH JOBADD2,JOB_CITY WITH JOBCITY,JOB_FAX WITH JOBFAX,JOB_TEL1 WITH JOBTEL1
   REPL JOB_TEL2 WITH JOBTEL2,JOB_TEL3 WITH JOBTEL3,JOB_TELEX WITH JOBTELEX,PAT_CODCRP WITH COCOD
   REPL AEA_MEMBER WITH AEAM,AEA_PROGR WITH PRONAM,AEA_ENDATE WITH AEADAT
   REPL MED_SCHEME with mds,MDS_ENDATE with mDSdat,MDS_NBER with mDSnbr
   DO CASE
      CASE PER .OR. DOC
         REPL AEASOS_PER WITH .T.,AEASOS_FAM WITH .F.
      CASE FAM
         REPL AEASOS_PER WITH .F.,AEASOS_FAM WITH .T.,FAM_RELPER WITH FAMRELPER,FAM_PERCOD WITH FAMPERCOD
   ENDCASE
   REPL PAT_CODDAT WITH "0000",PAT_CODTYP WITH '9',pat_filcod with kodepat,pat_codcre with '1'
   REPL DAT_CRFILE WITH DATFIL,ENTRY_DAT WITH ENTDAT,REL_FILCOD WITH RELCOD
*   REPL DAT_CRFILE WITH DATCRFILE,ENTRY_DAT WITH ENTDAT,REL_FILCOD WITH RELCOD
ENDIF
UNLOCK
